package org.example.implaoptwoway.aspectAnnoation;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class Main
{

    public static void main(String[] args)
    {
        ApplicationContext context = SpringApplication.run(Main.class, args);
        //获取代理对象
        UserDao userDao = context.getBean("userDao", UserDao.class);
        //调用 userDao 中的各个方法
        System.out.println(userDao.getClass().getName());
        userDao.add();
        userDao.adds();
        userDao.delete();
        userDao.get();
        userDao.modify();
    }
}